package com.xingdian.xingdianhulianweb.web;

import com.xingdian.xingdianhulianweb.common.ServerResponse;
import com.xingdian.xingdianhulianweb.service.IpInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/* *
 * @Author H2SO4
 * @ClassName: IpInfoController
 * @Description TODO
 * @Date 2019/11/26--18:10
 * */
@Controller
@RequestMapping("/page")
public class IpInfoController {

    @Autowired
    IpInfoService ipInfoService;

    @RequestMapping("/index")
    @ResponseBody
    public ServerResponse findIpInfo(){
        return ipInfoService.findIpInfo();
    }

    @RequestMapping("/products")
    @ResponseBody
    public ServerResponse findIpInfos(){
        return ipInfoService.findIpInfos();
    }
}
